<%@ page language="java" import="java.util.*" pageEncoding="utf-8"
	isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script type="text/javascript" src="<%=request.getContextPath()%>/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/easyui/locale/easyui-lang-zh_CN.js"></script>
<link href="<%=request.getContextPath()%>/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath()%>/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/jPages.css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/animate.css">
<script src="<%=request.getContextPath()%>/js/jquery-1.8.2.min.js"></script>
<script src="<%=request.getContextPath()%>/js/jPages.js"></script>
<script type="text/javascript">
$(function(){  
	$("div.holder").jPages({  
	  containerID : "item", 
	  first:"首页", 
	  previous : "上一页",  
	  next : "下一页",
	  last:"尾页",  
	  perPage : 10,  
	  //delay : 100,
	  //动画效果
	  //animation:"bounceInLeft"
	});  
 });  
</script>
<script type="text/javascript">
$(document).ready(function(){
  $(".click").click(function(){
 	 $(".tip").fadeIn(200);
  });
  
  $(".sure").click(function(){
 	 $(".tip").fadeOut(100);
  });

  $(".cancel").click(function(){
	  $(".tip").fadeOut(100);
	  $(".jiefeng").fadeOut(100);
  });
});
</script>
<style>
.sb{
	display: inline-block;
    font-size: 16px;
    height: 40px;
   width: 118px;
}
.sbd{
	display: inline-block;
    width: 13%;
}
</style>
</head>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><ema href="javascript:void">首页</em></li>
			<li><ema href="javascript:void">用户管理</em></li>
			<li><ema href="javascript:void">企业用户列表</em></li>
			<li><ema href="javascript:void">查看详情</em></li>
		</ul>
	</div>
	<div class="rightinfo">
		<div class="tools" style="height: 200px;">
				<span class="sb">头像：</span>
				<span class="sbd"><img src="${lists[0].photo}" alt="" style="width: 40px;height: 40px;" /></span>
				<span class="sb">ID：</span>
				<span class="sbd">${lists[0].id}</span>
				<span class="sb">手机号：</span>
				<span class="sbd">${lists[0].mobile}</span>
				<span class="sb">等级：</span>
				<span class="sbd">${lists[0].integral_rank}</span>
			<br/>
				<span class="sb">昵称：</span>
				<span class="sbd">${lists[0].username}</span>
				<span class="sb">真实姓名：</span>
				<span class="sbd">${lists[0].realname}</span>
				<span class="sb">实名认证：</span>
				<span class="sbd">	<c:if test="${lists[0].audit == 1}">已认证</c:if>
							<c:if test="${lists[0].audit == 2}">未认证</c:if>
							<c:if test="${lists[0].audit == 0}">未认证</c:if>
							<c:if test="${lists[0].audit == null}">未认证</c:if></span>
				<span class="sb">体重：</span>
				<span class="sbd">${lists[0].weight}</span>
			</tr>
			<br/>
				<span class="sb">企业认证：</span>
				<span class="sbd">	<c:if test="${lists[0].enteraudit == 1}">已认证</c:if>
							<c:if test="${lists[0].enteraudit == 2}">未认证</c:if>
							<c:if test="${lists[0].enteraudit == 0}">未认证</c:if>
								<c:if test="${lists[0].enteraudit == null}">未认证</c:if></span>
				<span class="sb">性别：</span>
				<span class="sbd"><c:if test="${lists[0].gender == 1}">男</c:if>
							<c:if test="${lists[0].gender == 2}">女</c:if>
							<c:if test="${lists[0].gender == 0}">未知</c:if></span>
				<span class="sb">年龄：</span>
				<span class="sbd">${lists[0].age}</span>
				<span class="sb">身高：</span>
				<span class="sbd">${lists[0].stature}</span>
			<br/>
				<span class="sb">会员：</span>
				<span class="sbd">${lists[0].expire_time  == '1' ? 'VIP':'普通用户'}</span>
				<span class="sb">所在地：</span>
				<span class="sbd">${lists[0].address}</span>
				<span class="sb">最近登录时间：</span>
				<span class="sbd">${lists[0].login_time}</span>
				<span class="sb">注册时间：</span>
				<span class="sbd">${lists[0].create_time}</span>
		</div>
			<form  style="  font-size: 16px;" action="<%=request.getContextPath()%>/selectUserCompanyList?userid=${lists[0].id}" method="post" name="serch">
		<td class="zi">员工列表</td>
			<td class="zi">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;城市：</td>
				<td><input type="text" id="addrees" name="addrees" style="    height: 20px; border:1px solid red;"/></td>
				<td class="zi">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;昵称：</td>
				<td><input type="text" id="userName" name="userName" style="    height: 20px; border:1px solid red;"/></td>
				<td class="zi">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;手机号：</td>
				<td><input type="text" id="userMobile" name="userMobile" style="    height: 20px; border:1px solid red;"/></td>
				<td class="zi">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;性别：</td>
						<td><select name="gender" style="width: 90px;height: 24px;">
								<option selected="selected"  value="">请选择</option>
								<option value="1">男</option>
								<option value="2">女</option>
								<option value="0">未知</option>
						</select></td>
							<div class="toolbar1">
				<table>
					<tr style="border: 0px ">
						<td><input type="submit" value="查询" class="button" /></td>
					</tr>
				</table>
			</div>
			</form>
		<table class="tablelist">
			<thead>
				<tr>
					<th>头像</th>
					<th>昵称</th>
					<th>手机号</th>
					<th>ID</th>
					<th>性别</th>
					<th>用户等级</th>
					<th>实名认证</th>
					<th>企业绑定</th>
					<th>会员</th>
					<th>所在地</th>
					<th>最近登录时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody class="tb" id="item">
				<c:forEach items="${mapList}" var="data">
					<tr>
						<td><img style="width: 80px;height: 80px;" src="${data.photo}" alt="" /> </td>
						<td>${data.username}</td>
						<td>${data.mobile}</td>
						<td>${data.user_id}</td>
							<td>
							<c:if test="${data.gender == 1}">男</c:if>
							<c:if test="${data.gender == 2}">女</c:if>
							<c:if test="${data.gender == 0}">未知</c:if>
						</td>
						<td>${data.integral_rank}</td>
						<td>
							<c:if test="${data.audit == 1}">已认证</c:if>
							<c:if test="${data.audit == 2}">未认证</c:if>
							<c:if test="${data.audit == 0}">未认证</c:if>
							<c:if test="${data.audit == null}">未认证</c:if>
						</td>
						<td>
							<c:if test="${data.entAudit == 1}">已绑定</c:if>
							<c:if test="${data.entAudit == 2}">未绑定</c:if>
							<c:if test="${data.entAudit == 0}">未绑定</c:if>
								<c:if test="${data.entAudit == null}">未绑定</c:if>
						</td>
 						<td>${data.expire_time  == '1' ? 'VIP':'普通用户'}</td>
						<td>${data.address}</td>
						<td>${data.login_time}</td>
						<td>
							<ul class="toolbar"style=" margin-left: 49px;">
						<li style="width: 33px;"><a style=" margin-left: 9px;"href="<%=request.getContextPath()%>/selectUserList?userid=${data.user_id}&entuserid=${lists[0].id}" >查看</a></li>
						<%-- <li style="    margin-left: 20px; width: 93px;"><a style=" margin-left: 9px;"href="<%=request.getContextPath()%>/selectCompanyList?userid=${data.id}" >企业服务情况</a></li> --%>
						<c:if test="${data.is_ban == 1}">	<li style="margin-left: 20px; width: 33px;"><strong onclick="update(this)" style="    margin-left: 6px;">封号</strong></li></c:if>
					<c:if test="${data.is_ban == 0}">	<li style="margin-left: 20px; width: 33px;">  <strong onclick="update(this)" style="    margin-left: 6px;">解封</strong></li></c:if>
						<%-- <li style="margin-left: 20px; width: 93px;"><a style=" margin-left: 9px;"href="/htx-backer/selectCompanyList?userid=${data.id}" >通过审核</a></li> --%>
						</ul>
						</td>
						<input name="userid" type="hidden" value="${data.user_id}"/>
						<input name="username" type="hidden" value="${data.username}"/>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<div style="clear:both;"></div>
		<!-- 分页的页码 -->
		<div class="holder"></div>
		共${numss}条记录
		<div class="tip">
			<div class="tiptop">
				<span>提示信息</span>
			</div>
			<div class="tipinfo">
				<span><img src="<%=request.getContextPath()%>/images/ticon.png" /></span>
				<div class="tipright">
					<p>是否确认审核通过 ？</p>
					<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
				</div>
			</div>
			<div class="tipbtn">
				<input name="" type="button" class="sure" value="确定"/>&nbsp;<input name="" type="button" class="cancel" value="取消" />
			</div>
		</div>
		
			<div class="tip">
			<div class="tiptop">
				<span>提示信息</span>
			</div>
			<div class="tipinfo">
				<span><img src="<%=request.getContextPath()%>/images/ticon.png" /></span>
				<div class="tipright">
					<p>是否确认封号 ？</p>
					<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
				</div>
			</div>
			<div class="tipbtn">
				<input name="" type="button" class="sure" value="确定"/>&nbsp;<input name="" type="button" class="cancel" value="取消" />
			</div>
		</div>
		<div class="jiefeng" style="width:485px; height:260px; position:absolute;top:10%; left:30%;background:#fcfdfd;box-shadow:1px 8px 10px 1px #9b9b9b;border-radius:1px;behavior:url(js/pie.htc); display:none; z-index:111111;">
			<div class="tiptop">
				<span>提示信息</span>
			</div>
			<div class="tipinfo">
				<span><img src="<%=request.getContextPath()%>/images/ticon.png" /></span>
				<div class="tipright">
					<p>是否确认解封 ？</p>
					<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
				</div>
			</div>
			<div class="tipbtn">
				<input name="" type="button" class="sure" value="确定"/>&nbsp;<input name="" type="button" class="cancel" value="取消" />
			</div>
		</div>
	</div>
	<script type="text/javascript">
	
	 $(".exportExcel").click(function(){
		 window.location.href = "<%=request.getContextPath()%>/enterpriseExportExcel";
	 })
	 
		$('.tablelist tbody tr:odd').addClass('odd');

	  function update(a){
		  var text = $(a).text();
		  var statu = "";
		  if(text == "封号"){
			  $(".tip").fadeIn(500);
			  statu = "0";
		  }else if(text == "解封"){
			  $(".jiefeng").fadeIn(500);
			  statu = "1";
		  }
		  $(".sure").click(function(){
			  debugger
			  var username = $(a).parent().parent().parent().parent().find("input[name=username]").val();
			var params = $(a).parent().parent().parent().parent().find("input[name=userid]").val()+ "," + statu + "," + username;;
			params+=",enter,${lists[0].id}"; 
			window.location.href="<%=request.getContextPath()%>/updateUserStatu?params="+params;
	     });
	  }
	</script>
	
</body>
</html>
